<%@ page contentType="text/html;charset=UTF-8"%>
<%@ page import="java.util.Vector,com.ejoysoft.wlanyz.business.Carriers,com.ejoysoft.wlanyz.business.*,com.ejoysoft.wlanyz.business.Bar,com.ejoysoft.common.Constants,com.ejoysoft.common.exception.NoRightException" %>
<%@page import="sun.reflect.generics.tree.IntSignature"%>
<%@page import="com.ejoysoft.common.Format"%>
<%@ page import="java.util.List"%>
<%@page import="java.util.Random"%>
<%@page import="java.util.List"%>
<%@page import="java.util.ArrayList"%>
<%@ include file="../include/jsp/head.jsp"%>

<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";	
%>

<html>
  <head>
    <base href="<%=basePath%>">
    
    <title>My JSP 'regional_coverage.jsp' starting page</title>
    <script type="text/javascript" src="http://api.map.baidu.com/api?v=1.4"></script>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<link href="../css/main.css" rel="stylesheet" type="text/css" />
	<script language="JavaScript" src="../include/date/popc.js"></script>
	<script src="../include/js/list.js"></script>
	<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
  </head>
  
  <body>
  <%
  
  	Carriers task0 = null;
	Carriers obj = new Carriers(globa);
	Bar b = new Bar("50", "#9933CC");
	b.setVar("bar_3d");
	//b.setVar("bar_glass");
	//b.setVar("bar_fade");
	Bar b2 = new Bar("50", "#0000FF");
	b2.setVar("bar_3d");
	Bar b3 = new Bar("50", "#C79810");
	b3.setVar("bar_3d");
	b.key("中国移动", 15);
	b2.key("中国联通", 15);
	b3.key("中国电信",15);

	
		String where = "where strCarriers= '中国移动'";
		Vector<Carriers> vctObj = obj.returnindex(where);
		double sun1=0;
		int intVct=(vctObj!=null&&vctObj.size()>0?vctObj.size():0);
		if(vctObj!=null){
    	for (int i = 0;i < vctObj.size(); i++) {
	    	Carriers obj1 = vctObj.get(i);
	    	sun1+=obj1.getIntAp_Relevacy_Delay();
		    
    	
    	}}
		sun1=sun1/intVct;
		b.add(Double.toString(sun1),"");
		
		String where2 = "where strCarriers= '中国联通'";
		Vector<Carriers> vctObj2 = obj.returnindex(where2);
		double sun12=0;
		int intVct2=(vctObj2!=null&&vctObj2.size()>0?vctObj2.size():0);
		if(vctObj2!=null){
    	for (int i = 0;i < vctObj2.size(); i++) {
	    	Carriers obj1 = vctObj2.get(i);
	    	sun12+=obj1.getIntAp_Relevacy_Delay();
    	}}
		sun12=sun12/intVct2;
		b2.add(Double.toString(sun12),"");
		
		
		String where3 = "where strCarriers= '中国电信'";
		Vector<Carriers> vctObj3 = obj.returnindex(where3);
		double sun13=0;
		int intVct3=(vctObj3!=null&&vctObj3.size()>0?vctObj3.size():0);
		if(vctObj3!=null){
    	for (int i = 0;i < vctObj3.size(); i++) {
	    	Carriers obj1 = vctObj3.get(i);
	    	sun13+=obj1.getIntAp_Relevacy_Delay();
    	
    	}}
		sun13=sun13/intVct3;
		
		b3.add(Double.toString(sun13),"");
		
				
	
  
	Graph g = new Graph();
	//坐标标题
	g.title("业务质量指标", "{font-size: 25px;}");
	g.getData_sets().add(b);
	g.getData_sets().add(b2);
	g.getData_sets().add(b3);
	g.bar_3D("75", "#D54C78", "2006", 8);
	g.bar_3D("75", "#3334AD", "2007", 8);
	g.bar_3D("75", "#C79810", "2007", 8);
	
	List<String> labels = new ArrayList<String>();
	labels.add("Ap关联平均时延");
	g.set_x_labels(labels);
	g.set_x_label_style("10", "#9933CC", 45, 1, "");
	g.set_x_axis_3d(5);
	g.x_axis_colour("#909090", "#ADB5C7");
	g.x_axis_colour("#909090", "#ADB5C7");
    g.x_axis_colour("#909090", "#ADB5C7");
	g.set_y_max(20);
	g.y_label_steps(10);
%>
<%=g.render()%>

	
  </body>
</html>
<%@ include file="../include/jsp/footer.jsp"%>
